#coding:utf8
import tkinter as tk
from chart.pie import pie
from chart.line import line

class Chart(tk.Frame):

    def __init__(self, master=None):
        tk.Frame.__init__(self, master)
        self.grid()
        self.createWidgets()
        
    def createWidgets(self):
        self.btcircle = tk.Button(self,text="生成饼状图",width="20",height="8",command=self.circle)
        self.btcircle.grid(row=0,column=0)
        self.btline = tk.Button(self,text="生成散点图",width="20",height="8",command=self.line)
        self.btline.grid(row=0,column=1)
    
    def circle(self):
        pie()
    
    def line(self):
        line()       